/***********************************************
 This file is part of redia-bapps-main-ios.
 
 Copyright (c) 2015 Redia A/S
 
 Redia-bapps-main-ios is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 Redia-bapps-main-ios is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with redia-bapps-main-ios.  If not, see <http://www.gnu.org/licenses/>.
 
 *********************************************** */

//
//  BAMagazineVolumeCell.m
//  redia-bapps-ios
//
//  Created by Brian Vestergaard Danielsen on 04/11/13.
//  Copyright (c) 2013 Redia A/S. All rights reserved.
//

#import "UIImage+MultiplyColor.h"

#import "BALibrarySettings.h"
#import "BAMagazineVolumeCell.h"

@interface BAMagazineVolumeCell()

@property (weak, nonatomic) IBOutlet UILabel *yearLabel;
@property (weak, nonatomic) IBOutlet UIImageView *arrowImageView;

@end

@implementation BAMagazineVolumeCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

-(void)awakeFromNib
{
    BA_LABEL_SET_FONT_LIGHT(self.yearLabel);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setVolume:(BAHoldingContainer*)holdingContainer
{
    self.arrowImageView.image = [UIImage imageNamed:@"related-disclose-arrow-left" multiplyWithColor:[[BALibrarySettings instance] getCustomerColorNormal]];
    [self.yearLabel setText:holdingContainer.title];
}

@end
